package com.gable.exhibition.dao;

import com.gable.exhibition.model.ContractDevice;

import java.util.List;
import java.util.Map;

/**
 * Created by Lesson on 2018/2/8.
 */
public interface CheckExeclDao {

    /**
     * 校验医院名称是否存在
     * @param hospitalCode
     * @Create date 2018/2/8
     * @Create user jacky
     * @return
     */
    int checkHospitalCode(String hospitalCode);

    /**
     * 校验省份名称
     * @param province
     * @Create date 2018/2/8
     * @Create user jacky
     * @return
     */
    List<Long> checkProvince(String province);

    /**
     * 校验城市名称
     * @param map
     * @Create date 2018/2/8
     * @Create user jacky
     * @return
     */
    List<Long> checkCity(Map map);

    /**
     * 校验区域名称
     * @param map
     * @Create date 2018/2/8
     * @Create user jacky
     * @return
     */
    List<Long> checkArea(Map map);

    /**
     * 校验厂商名称是否存在
     * @param manufacturerNo
     * @Create date 2018/2/8
     * @Create user jacky
     * @return
     */
    int checkManufacturerNo(String manufacturerNo);

    /**
     * 校验维修商名称是否存在
     * @param maintainerNo
     * @Create date 2018/2/22
     * @Create user jacky
     * @return
     */
    int checkMaintainerNo(String maintainerNo);

    /**
     * 根据厂商名称获取该厂商的id
     * @param manufacturerNo
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    Long queryManufacturerIdByNo(String manufacturerNo);

    /**
     * 校验经销商是否存在
     * @param supplierNo
     * @Create date 2018/2/31
     * @Create user jacky
     * @return
     */
    Long querySupplierIdByNo(String supplierNo);

    /**
     * 校验sn是否存在
     * @param sn
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    int checkDeviceSn(String sn);

    /**
     * 根据医院名称获取医院id
     * @param hospitalCode
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    Long queryHospitalIdByHospitalCode(String hospitalCode);

    /**
     * 根据维修商名称获取维修商id
     * @param maintainerNo
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    Long queryMaintainerIdByMaintainerNo(String maintainerNo);

    /**
     * 校验设备状态是否存在
     * @param deviceStatusStr
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    Long checkDeviceStatus(String deviceStatusStr);

    /**
     * 校验68分类一级是否存在
     * @param deviceTypeName
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    Long checkDeviceType(String deviceTypeName);

    /**
     * 校验68分类二级是否存在
     * @param deviceTypeSubName
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    Long checkDeviceTypeSub(String deviceTypeSubName);

    /**
     * 校验一二级的关系是否存在
     * @param map
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    int checkDeviceTypeSubParentId(Map map);

    /**
     * 校验合同编号是否存在
     * @param contractNo
     * @Create user jacky
     * @Create date 2018/2/24
     * @return
     */
    int checkContractNo(String contractNo);

    /**
     * 校验合同类型是否存在
     * @param contractTypeName
     * @Create user jacky
     * @Create date 2018/2/24
     * @return
     */
    Long checkContractType(String contractTypeName);

    /**
     * 根据合同编号获取合同id
     * @param contractNo
     * @Create user jacky
     * @Create date 2018/2/24
     * @return
     */
    Long queryContractIdByContractNo(String contractNo);

    /**
     * 根据合同编号和设备型号获取合同设备对象
     * @param map
     * @Create user jacky
     * @Create date 2018/2/24
     * @return
     */
    ContractDevice queryContractDeviceByContractNoAndDevcieModel(Map map);

    /**
     * 根据合同设备id获取该设备已经预计发货多少数量
     * @param contractDeviceId
     * @Create user jacky
     * @Create date 2018/2/24
     * @return
     */
    int querystimateQuantity(Long contractDeviceId);
}
